package com.mls.fivedistrict.dao;

import com.mls.fivedistrict.pojo.Integral;
import com.mls.fivedistrict.pojo.Record;
import com.mls.fivedistrict.pojo.RecordAndIntegral;
import com.mls.fivedistrict.pojo.RecordExample;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

public interface RecordMapper {
    long countByExample(RecordExample example);

    int deleteByExample(RecordExample example);

    int deleteByPrimaryKey(Long id);

    int insert(Record record);

    int insertSelective(Record record);

    List<Record> selectByExample(RecordExample example);

    List<Record> selectByExampleSingle(RecordExample example);

    Record selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") Record record, @Param("example") RecordExample example);

    int updateByExample(@Param("record") Record record, @Param("example") RecordExample example);

    int updateByPrimaryKeySelective(Record record);

    int updateByPrimaryKey(Record record);

    Integral selectIntegral(Long integralId);

    int insertBatch(List<Record> list);

    BigDecimal getRecordSum();

    void deleteBatch(List<Record> list);

    void recycleBatch(List<Record> list);

    List<RecordAndIntegral> searchAndIntegral(@Param("params") Map<String, String> params);

    int  deleteTranceRecord(Date createDate);

    List<Record> selectAllRecord(@Param("params") Map params);

    int updateForReceive(Record record);

    long getMaxId(Date createDate);

    int deleteBatchReal(List<Record> list);

}